﻿using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UMLSynthesizer.CSharpAnalyzer.Elements;
using UMLSynthesizer.CSharpAnalyzer.Helpers;
using UMLSynthesizer.LangAnalyzer.Elements;
using UMLSynthesizer.LangAnalyzer.Expressions;
using UMLSynthesizer.LangAnalyzer.Statements;

namespace UMLSynthesizer.CSharpAnalyzer.Expressions
{
    class CSharpParenthesizedExpression : CSharpExpressionBase, IParenthesizedExpression
    {
        #region Fields

        CSharpExpressionHelper exprHelper;

        #endregion

        #region Constructor

        public CSharpParenthesizedExpression(ParenthesizedExpressionSyntax expressionNode,
            IExpressionBase parentExpression,
            IStatementBase parentStatement)
            : base(expressionNode, parentExpression, parentStatement, ExpressionKinds.Parenthesized)
        { exprHelper = new CSharpExpressionHelper(this, parentStatement, () => expressionNode.Expression); }

        #endregion

        #region Properties

        public IExpressionBase Expression { get { return exprHelper.Expression; } }

        #endregion
    }
}
